#import "dfhgwhruebvhrheydiscardreveal.h"
@implementation dfhgwhruebvhrheydiscardreveal {
	UILabel *titleLabel;
	UILabel *valueLabel;
	UIView *line;
	UIImageView *more;
}
- (instancetype)initWithFrame:(CGRect)frame {
	if(self = [super initWithFrame:frame]) {
		[self setUI];
	}
	return self;
}
- (void)setUI {
	self.backgroundColor = [UIColor whiteColor];
	titleLabel = [[UILabel alloc] init];
	titleLabel.textColor = @"#3B414B".dhgfywegwygeydwlearneddesignate;
	titleLabel.font = [UIFont regular:15];
	[self addSubview:titleLabel];
	valueLabel = [[UILabel alloc] init];
	valueLabel.textColor = @"#3B414B".dhgfywegwygeydwlearneddesignate;
	valueLabel.font = [UIFont regular:15];
	[self addSubview:valueLabel];
	line = [[UIView alloc] init];
	line.backgroundColor = @"#E6E6E6".dhgfywegwygeydwlearneddesignate;
	[self addSubview:line];
	more = [[UIImageView alloc] init];
	more.image = [UIImage imageNamed:@"more"];
	[self addSubview:more];
}
- (void)layoutSubviews {
	[super layoutSubviews];
	[titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
		make.top.equalTo(self).offset(15).priorityHigh();
		make.height.mas_equalTo(21).priorityHigh();
		make.left.equalTo(self).offset(15);
		make.centerY.equalTo(self);
	}];
	[valueLabel mas_makeConstraints:^(MASConstraintMaker *make) {
		make.right.equalTo(self).offset(-15).priorityHigh();
		make.centerY.equalTo(titleLabel);
	}];
	if(!more.isHidden) {
		[more mas_makeConstraints:^(MASConstraintMaker *make) {
			make.size.mas_equalTo(CGSizeMake(13, 13));
			make.right.equalTo(self).offset(-15);
			make.centerY.equalTo(self);
		}];
		[valueLabel mas_updateConstraints:^(MASConstraintMaker *make) {
			make.right.equalTo(more.mas_left).offset(-5);
		}];
	}
	[line mas_makeConstraints:^(MASConstraintMaker *make) {
		make.left.bottom.right.equalTo(self);
		make.height.mas_equalTo(1);
	}];
}
- (void)setTextColor:(UIColor *)color {
	titleLabel.textColor = color;
	valueLabel.textColor = color;
}
- (void)updateTitle:(NSString *)title andValue:(NSString *)value isHiddenLine:(BOOL)hidden {
	more.hidden = YES;
	line.hidden = hidden;
	titleLabel.text = title;
	valueLabel.text = value;
	if ([title isEqualToString:@"Coupon"]) {
		more.hidden = NO;
		valueLabel.textColor = @"#FB3314".dhgfywegwygeydwlearneddesignate;
	}
}
- (void)updateTopConstraints:(CGFloat)top {
	[titleLabel mas_updateConstraints:^(MASConstraintMaker *make) {
		make.top.equalTo(self).offset(top);
	}];
}
@end
